package com.ujson.uaa.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

@Configuration
public class Swagger3Config {
    /*private ApiInfo apiInfo(){
        return new ApiInfoBuilder()
                .title("管理系统")
                .description("管理系统的API接口文档")
                .version("1.0.1")
                .build();
    }

    @Bean
    public Docket createRestApi() {
        return new Docket(DocumentationType.SWAGGER_2)
                .groupName("uaa")
                .select()
                .apis(RequestHandlerSelectors.withMethodAnnotation(RestController.class)) //只有在接口上加了Operation注解才展示
                .apis(RequestHandlerSelectors.basePackage("com.ujson.uaa.controller"))
                .build()
                .apiInfo(apiInfo())
                .enable(true)
                ;
    }*/
}
